﻿using System.Web.Mvc;
using ENail.Domain.Core;
using ENail.Portal.Web.Models;

namespace ENail.Portal.Web.Controllers
{
    public class HomeController : BaseController
    {
        //
        // GET: /Home/

        [Authorize]
        public ActionResult Index()
        {
            if (User != null && User.Identity.IsAuthenticated)
            {
                var user = User as User;
                if (user != null && user.NailSalon != null)
                {
                    var model = new HomeViewModel(user.NailSalon.Name);
                    return View(model);
                }
            }

            return View();
        }
        [ActionName("InitializeTask")]
        [AcceptVerbs(HttpVerbs.Get | HttpVerbs.Post | HttpVerbs.Head)]

        public ActionResult InitializeTask()
        {
            return PartialView();
        }
    }
}
